package com.icss.train_sys_back.service.train_manage.impl;

import com.icss.train_sys_back.entity.train_manage.StationEntity;
import com.icss.train_sys_back.mapper.train_manage.StationMapper;
import com.icss.train_sys_back.service.train_manage.StationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wk
 * @desc
 * @date 2025/9/23 14:07
 */
@Service("stationService")
public class StationServiceImpl implements StationService {
    @Autowired
    private StationMapper stationMapper;
    @Override
    public List<StationEntity> findStationList(String stationName, String province) {
        //将车站的信息存入redis的GEO中

        return stationMapper.findStationList(stationName, province);
    }

    @Override
    public boolean save(StationEntity stationEntity) {
        return stationMapper.save(stationEntity);
    }

    @Override
    public boolean update(StationEntity stationEntity) {
        return stationMapper.update(stationEntity);
    }

    @Override
    public boolean delete(Integer id) {
        return stationMapper.delete(id);
    }
}
